(function() {
	function _load_collect_bus() {
		coAjax.get(appConfig.user.collectBus_with_goods_info, function(result) {
			App.set("$Cache.user.collectBus_with_goods_info", result.result);
		}, function(errorCode, xhr, errorMsg) {
			alert("error", errorMsg);
		});
	};
	Path.on("/user/__basename__.html",function (_current_location) {
		_load_collect_bus();
	});
	App.set("$Event.user.collection.remove_collect_bus", function(e, vm) {
		coAjax["delete"](appConfig.user.collectBus_remove, {
			bus_id: vm.get("_id")
		}, function(result) {
			alert("success", "已经取消收藏");
			// _load_collect_bus();
			vm.remove();
			_load_collect_bus();
		}, function(errorCode, xhr, errorMsg) {
			alert("error", errorMsg)
		});
	});
}());